OGPカードのリンク先を投稿されたURLに変更する#5152
Conversation
|
Preview (prod) → https://5152-prod.traq-preview.trapti.tech/ |
📝 WalkthroughWalkthrough
ChangesOGP item rendering refactor
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vue`:
- Around line 4-5: v-for の key が現在 :key="item.url"
だと同一URLが複数ある場合に重複してしまうため、MessageOgpList.vue の ogpItems をループしている箇所で key
を一意化してください(例: item.url にループインデックスや item.id を組み合わせる)。具体的には v-for="(item, index)
in ogpItems" のようにインデックスを取得し、:key に item.url と index か、もし利用可能なら固有の識別子(item.id
など)を組み合わせて一意のキーを生成するよう修正してください。
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cc3f24cf-bc96-4560-85a1-5061d36fe317
📒 Files selected for processing (2)
src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vuesrc/components/Main/MainView/MessageElement/Embeddings/MessageOgpListItem.vue
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5152 +/- ##
=======================================
Coverage 62.43% 62.43%
=======================================
Files 108 108
Lines 3109 3109
Branches 635 635
=======================================
Hits 1941 1941
Misses 1058 1058
Partials 110 110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 1 file(s) based on 1 unresolved review comment. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
uni-kakurenbo
left a comment
There was a problem hiding this comment.
みま
した
(一点だけコメントしてます)
| .filter(isDefined) | ||
| .filter(o => o.title) | ||
| const ogpItems = computed(() => | ||
| props.externalUrls.flatMap(url => { |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vue (1)
34-34: 💤 Low value型注釈は不要です。
externalUrlsは props でstring[]型として定義されているため、urlの型は既に推論されています。明示的な: string注釈は冗長です。♻️ 簡略化案
props.externalUrls - .map((url: string) => { + .map((url) => { const ogpData = ogpDataMap.value.get(url)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vue` at line 34, Props externalUrls is already typed as string[], so remove the redundant explicit type annotation in the map callback; change the arrow function from .map((url: string) => { ... }) to .map((url) => { ... }) so url is inferred from externalUrls and the code is simpler.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vue`:
- Line 34: Props externalUrls is already typed as string[], so remove the
redundant explicit type annotation in the map callback; change the arrow
function from .map((url: string) => { ... }) to .map((url) => { ... }) so url is
inferred from externalUrls and the code is simpler.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 73dcd047-3699-4872-9b46-20f61f9298d4
📒 Files selected for processing (1)
src/components/Main/MainView/MessageElement/Embeddings/MessageOgpList.vue
概要
なぜこの PR を入れたいのか
OGPカードのリンク先としてog:urlを使うのは間違っていると思われる
主な文脈:https://q.trap.jp/messages/019d1988-4202-75bc-beed-a9c09b16ee95
動作確認の手順
https://cover-corp.com/news/detail/c2026032201 などのOGPカードを踏む
UI 変更部分のスクリーンショット
(UI変更なし)
PR を出す前の確認事項
見てほしいところ・聞きたいことなど
Summary by CodeRabbit